package com.javasm.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.annotation.WebListener;

/**
 * @author WangJie
 * @version 1.0
 * @Description:
 * @date: 2020/7/15 15:25
 * @since JDK 1.8
 */
@WebListener
public class ServletContextListener implements javax.servlet.ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        try {
            Class.forName("com.javasm.util.DruidUtil");
            System.out.println("druid随服务器的启动一同加载了...");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
